#include "Server.hpp"
#include <iostream>

using namespace std;

int main()
{
    Server server;
    server.OpenPipeForRead();

    string message;
    while (true)
    {
        if (server.RecvPipe(&message) > 0)
        {
            cout << "client Says# " << message << endl;
        }
        else
        {
            //读到文件结尾
            break;
        }
    }
    cout << "client quit, me too" << endl;

    server.ClosePipe();
    return 0;
}